import { Column, Entity, PrimaryGeneratedColumn, Unique } from 'typeorm';

/**
 * 组件
 */
@Entity('permission')
export class Permission {
  // 自增Id
  @PrimaryGeneratedColumn()
  id: number;

  @Column({
    comment: '权限key',
    nullable: true,
  })
  @Unique(['key'])
  key: string;

  @Column({
    comment: '权限名称',
    nullable: true,
  })
  name: string;

  @Column({
    comment: '备注',
    default: '',
  })
  remark: string;
}
